unit fArchive;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
  cxEdit, DB, cxDBData, Menus, cxLookAndFeelPainters, StdCtrls, cxButtons,
  cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView,
  cxGridTableView, cxGridDBTableView, cxGrid, uDAInterfaces, uDADataTable,
  uDAScriptingProvider, uDAMemDataTable, uDARemoteDataAdapter, cxLookAndFeels,
  dxSkinsCore, dxSkinCaramel, dxSkinOffice2010Silver, dxSkinSeven,
  dxSkinscxPCPainter;

type
  TfmArchive = class(TForm)
    tvArchive: TcxGridDBTableView;
    lvArchive: TcxGridLevel;
    grdArchive: TcxGrid;
    btnBatch: TcxButton;
    btnOk: TcxButton;
    rdaBrowser: TDARemoteDataAdapter;
    tblBrowser: TDAMemDataTable;
    dsBrowser: TDADataSource;
    tvArchiveName: TcxGridDBColumn;
    tvArchiveColumn2: TcxGridDBColumn;
    tvArchiveColumn3: TcxGridDBColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure tblBrowserNewRecord(DataTable: TDADataTable);
    procedure btnBatchClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmArchive: TfmArchive;

implementation

uses
  fBatchArchive;

{$R *.dfm}

procedure TfmArchive.btnBatchClick(Sender: TObject);
var
  form: TfmBatchArchive;
begin
  form := TfmBatchArchive.Create(nil);
  form.ShowModal;
  form.Free;
end;

procedure TfmArchive.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  tblBrowser.Close;
end;

procedure TfmArchive.FormCreate(Sender: TObject);
begin
  tblBrowser.Open;
end;

procedure TfmArchive.tblBrowserNewRecord(DataTable: TDADataTable);
begin
  tblBrowser.FieldByName('bsa_createdate').AsDateTime := Date;
end;

end.
